<?php
if($access_control != "924y39c9vns8r73"){ header("location:../"); }
echo "<script>bg_menu('m_caixa');</script>\n";
include_once "controle/caixa.php";
?>
<h1>Movimento</h1>
<fieldset>
    <legend>Filtro</legend>
    <form action="" method="post" id="form_filtro_movimento">
        <table class="tabela">
            <tr>
                <td>
                    Data inicial<br>
                    <input type="text" name="dt_ini" value="<?=data_ptbr($filtro_data_inicial)?>" maxlength="10" OnKeyPress="formatar(this, '00/00/0000')">
                </td>
                <td>
                    Hora inicial<br>
                    <input type="text" name="hr_ini" value="<?=$filtro_hora_inicial?>" maxlength="8" OnKeyPress="formatar(this, '00:00:00')">
                </td>
            </tr>
            <tr>
                <td>
                    Data final<br>
                    <input type="text" name="dt_fim" value="<?=data_ptbr($filtro_data_final)?>" maxlength="10" OnKeyPress="formatar(this, '00/00/0000')">
                </td>
                <td>
                    Hora final<br>
                    <input type="text" name="hr_fim" value="<?=$filtro_hora_final?>" maxlength="8" OnKeyPress="formatar(this, '00:00:00')">
                </td>
            </tr>
            <tr>
                <td>
                    <button class="botao" type="submit" name="btn_filtrar" value="Filtrar">Filtrar</button>
                </td>
                <td></td>
            </tr>
        </table>
        
    </form>
</fieldset>

<table class="tabela">
    <tr>
        <th>Data</th>
        <th>Descrição</th>
        <th>Entrada</th>
        <th>Saída</th>
    </tr>
    <?=mostraMovimento($filtro_data_inicial, $filtro_hora_inicial, $filtro_data_final, $filtro_hora_final)?>
</table>
